package com.parser;

import java.util.ArrayList;

public abstract class SourceLineBase {

	protected String m_line; 			// Characters in the current line
	protected int m_firstLexemeColumn; 	// First column number of current lexeme
	protected int m_lastLexemeColumn; 	// Last column number of current lexeme
	protected int m_lineNo = 1; 		// Line number in original source
	protected ArrayList<com.parser.LineError> m_errors = new ArrayList<LineError>(); // Collection of errors in current line

	protected abstract void clearLine();	// clears the line
	protected abstract void printErrors(); 	// prints error messages in current line
	
	public SourceLineBase() {
		super();
	}
	
	public abstract void buildLine(String str);	// builds the line (appends str to current line)
	public abstract void printLine();			// prints the line and error messages in line if any
	public abstract void setError(String msg);	// sets an error message
	public abstract void newLine();				// announces a new line in the input
}